
<template>
  <div class="app-container">
    <el-row :gutter="24" class="mb8">
      <el-col :span="12">
        <el-button
          style="margin: 2px 10px 2px 0"
          :type="num==0?'primary':''"
          @click="testOver()"
          >考试结束无答案</el-button
        >
        <el-button
          style="margin: 2px 10px 2px 0"
          :type="num==3?'primary':''"
          @click="testIng()"
          >考试中列表
        </el-button>
        <el-button
          style="margin: 2px 10px 2px 0"
          :type="num==1?'primary':''"
          @click="offline()"
          >离线管理
        </el-button>
        <el-button
          style="margin: 2px 10px 2px 0"
          :type="num==2?'primary':''"
          @click="noJournal()"
          >考试结束无日志
        </el-button>
      </el-col>
      <el-col :span="12" style="text-align: right">
        <el-button
          style="margin: 4px 0 0 0"
          type="primary"
          icon="el-icon-refresh"
          size="mini"
          @click="$router.go(0)"
          >刷新</el-button
        >
      </el-col>
    </el-row>
    <div v-show="num == 0">
      <testOver ref="testOver" :anStatusList="anStatusList"></testOver>
    </div>
    <div v-show="num == 1">
      <offline
        ref="offline"
        :quekaoStatusList="quekaoStatusList"
        :offLineStatusList="offLineStatusList"
      ></offline>
    </div>
    <div v-show="num == 2">
      <noJournal
        ref="noJournal"
        :DbTypeStatusList="DbTypeStatusList"
        :testSiteList="testSiteList"
      ></noJournal>
    </div>
    <div v-show="num == 3">
      <testIng ref="testIng" :anStatusList="anStatusList"></testIng>
    </div>
  </div>
</template>

<script>
import testOver from "@/components/ToolSystem/Examine/testOver";
import offline from "@/components/ToolSystem/Examine/offline";
import noJournal from "@/components/ToolSystem/Examine/noJournal";
import testIng from "@/components/ToolSystem/Examine/testIng";

export default {
  name: "Examine",
  components: { testOver, offline, noJournal, testIng },
  data() {
    return {
      num: 0,
      anStatusList: [], // 算分答案状态列表
      quekaoStatusList: [], //缺考状态
      offLineStatusList: [], //离线状态
      DbTypeStatusList: [], //日志状态
      testSiteList: [], //考位状态
    };
  },
  created() {
    // 算分答案
    this.getDicts("answer_source").then((response) => {
      this.anStatusList = response.data;
    });
    // 缺考状态
    this.getDicts("examine_quekao").then((response) => {
      this.quekaoStatusList = response.data;
    });
    // 离线状态
    this.getDicts("examine_lixian").then((response) => {
      this.offLineStatusList = response.data;
    });
    // 日志状态
    this.getDicts("examine_logDbType").then((response) => {
      this.DbTypeStatusList = response.data;
    });
    // 考位状态
      this.getDicts("e_status").then((response) => {
      this.testSiteList = response.data;
    });

  },
  methods: {
    testOver() {
      this.num = 0;
    },
    testIng() {
      this.num = 3;
    },
    offline() {
      this.num = 1;
    },
    noJournal() {
      this.num = 2;
    },
  },
};
</script>

<style lang="scss">
@import "@/assets/styles/card.scss";
</style>


